<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>移动端 1px 的问题</title>
    <style>
        body {
            margin: 0;
            padding: 20px
        }
        div {
            padding: 1em;
            margin: 1em;
        }
        .box {
            position: relative;
            width: 200px;
            height: 200px;
            background-color: aqua;
        }
        .box:after {
            content: " ";
            position: absolute;
            top: 0;
            left: 0;
            width: 200%;
            height: 200%;
            transform: scale(0.5);
            transform-origin: left top;
            box-sizing: border-box;
            border: 1px solid #000;
            border-radius: 4px;
            background-color: red;
        }
    </style>
</head>
<!-- 这个属于用伪元素将父元素覆盖（宽高设置成两倍，用scale缩放0.5倍），然后伪元素自己增加border；transform-origin属性比较关键 -->
<!-- https://juejin.cn/post/7082393273137889287?share_token=63660602-8797-4658-ad65-ca008f11643e -->
<body>
    <div class="box">
        1px 的四条边框
    </div>
</body>

</html>
